﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Infrastructure.Dto.Request.Lottery
{
    /// <summary>
    /// 抽奖活动创建请求DTO
    /// </summary>
    public class LotteryActivityCreateRequestDto
    {
        /// <summary>
        /// 抽奖活动ID
        /// </summary>
        [StringLength(32)]
        public string? Id { get; set; }

        /// <summary>
        /// 活动名称
        /// </summary>
        [StringLength(64)]
        public string Name { get; set; } = null!;

        /// <summary>
        /// 活动类型：0=默认，1=九宫格，2=转盘
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 活动状态：1=草稿，2=上架，3=下架
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 活动开始时间
        /// </summary>
        [Column(TypeName = "timestamp(6) without time zone")]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 活动结束时间
        /// </summary>
        [Column(TypeName = "timestamp(6) without time zone")]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 活动规则
        /// </summary>
        public string? ActivityRules { get; set; }

        /// <summary>
        /// 渠道/入口
        /// </summary>
        [StringLength(32)]
        public string? Channel { get; set; }

        /// <summary>
        /// 配置版本号（前后端一致性校验）
        /// </summary>
        [StringLength(32)]
        public string? ConfigVersion { get; set; }

        /// <summary>
        /// 用户每日参与次数上限（0=不限）
        /// </summary>
        public int DailyLimit { get; set; }

        /// <summary>
        /// 用户在活动期间总参与次数上限（0=不限）
        /// </summary>
        public int TotalLimit { get; set; }

        /// <summary>
        /// 参与冷却时间（秒）
        /// </summary>
        public int CooldownSeconds { get; set; }

        /// <summary>
        /// 启用状态：0=禁用，1=启用
        /// </summary>
        public int EnableStatus { get; set; }

        /// <summary>
        /// 扩展属性（JSON文本）
        /// </summary>
        public string? ExtraProperties { get; set; }

        /// <summary>
        /// 并发标记
        /// </summary>
        [StringLength(40)]
        public string? ConcurrencyStamp { get; set; }

        /// <summary>
        /// 是否需要登记手机号
        /// </summary>
        public bool RegisterPhone { get; set; } = false;

        /// <summary>
        /// 是否需要登记身份证
        /// </summary>
        public bool RegisterIdentityCard { get; set; } = false;

        /// <summary>
        /// 过期时间（单位秒）
        /// </summary>
        public int ExpirationTime { get; set; }

    }
}
